import React, { Component } from 'react';
import { Route, Switch, Redirect } from 'react-router-dom'


import Tabbar from '../components/Tabbar';

import Home from './index/Home.jsx';
import Cate from './index/Cate.jsx';
import Car from './index/Car.jsx';
import Mine from './index/Mine.jsx';
class Index extends Component {
    render() {
        return (
            <div className='index'>
                <Switch>
                    <Route path='/index/home' component={Home} />
                    <Route path='/index/cate' component={Cate} />
                    <Route path='/index/car' component={Car} />
                    <Route path='/index/mine' component={Mine} />
                    <Redirect from='/index' to='index/home' />
                </Switch>
                <Tabbar></Tabbar>
            </div>
        );
    }
}

export default Index;